home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_0799 / 796 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  1.8 KB

  1. Date: Wed, 12 Jan 94 10:04:53 -0500
  2. From: dsb@cs.duke.edu (Scott Bigham)
  3. Message-Id: <9401121504.AA24174@amazon.cs.duke.edu>
  4. To: mint@terminator.rs.itd.umich.edu
  5. Subject: Re:  [MINTOS] compiler switch (was: Re: MiNT goes UNiX, ...)
  6.  
  7. >The only information the __MINT__ switch provides, is that the target
  8. >operating system is MiNT rather than pure Gemdos.
  9.  
  10. Not even that much, in fact; all it says is that the code is being
  11. compiled with the MiNTlibs.  The libs do a lot of backward-bending to
  12. handle TOS environments.
  13.  
  14. >                                                  What we need is a switch
  15. >that tells a bit more about the target system in general: for example that
  16. >reasonable filesystems (like minixfs) will be used (no need to mess around
  17. >with filenames like bison.simple or .profile), and that the environment
  18. >variables should follow the Unix conventions (PATH, MANPATH, etc.).
  19.  
  20. But that's not the point.  I'm trying to write code that runs on a
  21. GEMDOS filesystem but takes advantage of MinixFS if it's present; that
  22. runs under TOS but takes advantage of MiNT if it's present; and so on.
  23. I don't want to limit the utility of the programs I write to just us
  24. UNIX freaks ;) , and I don't want to have to build a different version
  25. of my programs for every kind of target system someone might want to
  26. run them on..  That means runtime checks of the local system's setup,
  27. and I think __MINT__ is still the most appropriate #ifdef to wrap those
  28. checks in.
  29.  
  30. >There shouldn't be any compiler dependent code in an application, that's
  31. >what the P1003.1 types (size_t, ssize_t, clock_t, ...) are all about.
  32.  
  33. Heh.  Were it only so simple.  Many's the time I've had to add some
  34. #ifdef __HSC__'d lines to kludge around features that HSC simply didn't
  35. support (really large arrays, for instance).
  36.  
  37.                         -sbigham
  38.